<div class="col-lg-12">
	<!--当前位置 start-->
	<div class="row">
		<div class="col-lg-12">
			<ol class="breadcrumb">
				<li><a href="#"><i class="fa fa-home mrg-r-sm"></i>首页</a>
				</li>
				<li class="active"><span>回访管理页面</span>
				</li>
			</ol>
		</div>
	</div>
	<!--当前位置 end-->

	<!--代码写在这里-->
	<div class="row">

		<div class="col-lg-12">
			<div class="main-box">
				<header class="main-box-header clearfix">
					<h2>回访管理</h2>
				</header>
				<div class="main-box-body clearfix">
					<form class="form-horizontal" role="form">
                        <div class="form-group">
                            <label class="col-lg-2 control-label">订单号</label>
                            <div class="col-lg-6">
                                <input type="text" class="form-control" ng-model="order.order_id" readonly="readonly">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-lg-2 control-label">会员卡号</label>
                            <div class="col-lg-6">
                                <input type="text" class="form-control" ng-model="order.card_number" readonly="readonly">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-lg-2 control-label">联系人</label>
                            <div class="col-lg-6">
                                <input type="text" class="form-control" ng-model="order.name" readonly="readonly">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-lg-2 control-label">联系电话</label>
                            <div class="col-lg-6">
                                <input type="text" class="form-control" ng-model="order.phone" readonly="readonly">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-lg-2 control-label">联系地址</label>
                            <div class="col-lg-6">
                                <input type="text" class="form-control" ng-model="order.address" readonly="readonly">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-lg-2 control-label">预约时间</label>
                            <div class="col-lg-6">
                                <input type="text" class="form-control" ng-model="order.time" readonly="readonly">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-lg-2 control-label">下单时间</label>
                            <div class="col-lg-6">
                                <input type="text" class="form-control" ng-model="order.create_time" readonly="readonly">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-lg-2 control-label">服务项目</label>
                            <div class="col-lg-1">
                                <input type="text" class="form-control" ng-model="order.serviceType1_title" readonly="readonly">
                            </div>
                            <div class="col-lg-1">
                                <input type="text" class="form-control" ng-model="order.serviceType2_title" readonly="readonly">
                            </div>
                            <div class="col-lg-4">
                                <input type="text" class="form-control" ng-model="order.serviceType3_title" readonly="readonly">
                            </div>
                        </div>
                        <div class="form-group" ng-if="order.settlement_status=='1'">
                            <label class="col-lg-2 control-label">订单金额(元)</label>
                            <div class="col-lg-6">
                                <input type="text" class="form-control" ng-model="order.settlement_total" readonly="readonly">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-lg-2 control-label">订单状态</label>
                            <div class="col-lg-6">
                                <input type="text" class="form-control" ng-model="order.status" readonly="readonly">
                            </div>
                        </div>
                        <div class="form-group" ng-if="order.status=='终止订单'">
                            <label class="col-lg-2 control-label">终止订单原因</label>
                            <div class="col-lg-6">
                                <input type="text" class="form-control" disabled  value="" ng-model="order.reason"/>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-lg-2 control-label">订单详情</label>
                            <div class="col-lg-6">
                                <input type="text" class="form-control" ng-model="order.detail" readonly="readonly">
                            </div>
                        </div>
                        <div class="form-group" >
                            <label class="col-lg-2 control-label">当前服务商</label>
                            <div class="col-lg-6">
                                <input type="text" class="form-control" disabled value="" ng-model="order.selected_company_name"/>
                            </div>
                        </div>

                        <div class="form-group" >
                            <label class="col-lg-2 control-label">当前服务商电话</label>
                            <div class="col-lg-6">
                                <input type="text" class="form-control" disabled value="" ng-model="order.selected_company_phone"/>
                            </div>
                        </div>
                        <div class="form-group" ng-if=" order.selected_company_code == '12349E' ">
                            <label class="col-lg-2 control-label">当前服务站</label>
                            <div class="col-lg-5">
                                <input type="text" class="form-control" disabled value="" ng-model="order.selected_manager_group_name"/>
                            </div>
                            <div class="col-lg-1">
                                <a class="btn btn-success pull-left" ng-click="modify_group()">修改服务站</a>
                            </div>
                        </div>
                        <div class="form-group" ng-show = "modify_group_tag">
                            <label class="col-lg-2 control-label">新服务站</label>
                            <div class="col-lg-5">
                                <select class="form-control" ng-model="order.new_manager_group" ng-options="companyName.groupName for companyName in companyNameList">
                                    <option value="">请选择</option>
                                </select>
                            </div>
                            <div class="col-lg-1">
                                <a class="btn btn-success pull-left" ng-click="submit_new_manager_group(order)">确定修改</a>
                            </div>
                        </div>
                        <div class="form-group" >
                            <label class="col-lg-2 control-label">当前服务人员</label>
                            <div class="col-lg-6">
                                <input type="text" class="form-control" disabled value="" ng-model="order.selected_servant_name"/>
                            </div>
                        </div>
                        <div class="form-group" >
                            <label class="col-lg-2 control-label">当前服务人员电话</label>
                            <div class="col-lg-6">
                                <input type="text" class="form-control" disabled value="" ng-model="order.selected_servant_phone"/>
                            </div>
                        </div>
						<h3>服务历史追踪</h3>
						<div class="main-box-body clearfix" >
							<div class="table-responsive">
								<table class="table table-hover table-striped text-center">
									<thead >
										<tr>
											<th class="text-center"><span>操作时间</span></th>
											<th class="text-center"><span>操作人员</span></th>
											<th class="text-center"><span>操作行为</span></th>
											<th class="text-center"><span>操作类型</span></th>
										</tr>
									</thead>
									<tbody >
										<tr role="row" class="odd"  ng-repeat="item in historylist" >
											<td class="sorting_1">{{item.time}}</td>
											<td>{{item.username}}</td>
											<td>{{item.action}}</td>
											<td>{{item.type}}</td>
										</tr>
										
									</tbody>
								</table>
							</div>
						</div>
				        <h3>回访</h3>
				       
				        <div class="form-group" ng-show="order.visit_type=='回访成功'">
				        	<label class="col-lg-2 control-label" >回访评分</label>
				        	<div class="col-lg-6">
				        		<div class="radio radio-inline">
									<input name="optionsRadios" id="optionsRadios0" ng-model="order.score"   value="0"  type="radio">
									<label for="optionsRadios0">
										投诉
									</label>
								</div>
								<div class="radio radio-inline" >
									<input name="optionsRadios" id="optionsRadios1" value="1" ng-model="order.score" type="radio">
									<label for="optionsRadios1">
										不满意
									</label>
								</div>
								<div class="radio radio-inline">
									<input name="optionsRadios" id="optionsRadios3" value="3" ng-model="order.score" type="radio">
									<label for="optionsRadios3">
										满意
									</label>
								</div>
								<div class="radio radio-inline">
									<input name="optionsRadios" id="optionsRadios5" value="5" ng-model="order.score" type="radio">
									<label for="optionsRadios5">
										非常满意
									</label>
								</div>
							</div>
				        </div>
                        <div class="form-group">
                            <label class="col-lg-2 control-label" >回访类型</label>
                            <div class="col-lg-6">
                                <span style="display:inline-block; margin-right:10px" ng-show="order.visit_success_type == 0">
                                    <input id="visit_success" type="radio" ng-model='order.visit_type' value="回访成功"  />
                                    <label for="visit_success">回访成功并完成</label>
                                </span>
                                <span style="display:inline-block; margin-right:10px">
                                    <input id="visit_final"  type="radio" ng-model='order.visit_type' value="终止订单回访" />
                                    <label for="visit_final">终止订单回访</label></span>
                                <span style="display:inline-block; margin-right:10px">
                                    <input id="visit_fail" type="radio" ng-model='order.visit_type' value="回访失败"  />
                                    <label for="visit_fail">回访失败</label>
                                </span>
                            </div>
                        </div>
						<div class="form-group">
				        	<label class="col-lg-2 control-label" >回访备注</label>
				        	<div class="col-lg-6">
								<textarea type="text" class="form-control" ng-model="order.reComments" value=""></textarea>
							</div>
				        </div>
				    
						<div class="form-group">
							<div class="col-lg-offset-2 col-lg-6">
                                <a class="btn btn-success" ng-show="returnVisitStatus != 'doing'" ng-click="returnVisit(order)">确定</a>
                                <a class="btn btn-success" ng-show="returnVisitStatus == 'doing'" >正在提交</a>
                                <!--<a class="btn btn-success" ng-click="update(order)">确定</a>-->
								<a class="btn btn-danger" href="#/order">取消</a>
							</div>
						</div>
					</form>
                    <h3>回访记录</h3>
                    <div class="main-box-body clearfix">
                        <div class="table-responsive">
                            <table class="table table-hover table-striped text-center">
                                <thead>
                                <tr>
                                    <th class="text-center"><span>回访时间</span></th>
                                    <th class="text-center"><span>回访人员</span></th>
                                    <th class="text-center"><span>回访原因</span></th>
                                    <th class="text-center"><span>回访类型</span></th>
                                </tr>
                                </thead>
                                <tbody>
                                <tr role="row" class="odd ng-scope" ng-repeat="item in order.return_visit_list">
                                    <td class="sorting_1 ng-binding">{{item.time}}</td>
                                    <td class="ng-binding">{{item.record_manager_account}}</td>
                                    <td class="ng-binding">{{ item.reason }}</td>
                                    <td class="ng-binding">{{ item.type }}</td>
                                </tr>

                                </tbody>
                            </table>
                        </div>
                    </div>
				</div>
			</div>
		</div>
	</div>
</div>